package thread.test;

import java.util.HashMap;
import java.util.Map;
/**
 * map根据equals来判断key
 * @author Han
 */
public class USER {
	@Override
	public boolean equals(Object obj) {
		return true;
	}
	@Override
	public int hashCode() {
		return 123123;
	}
	
	public static void main(String[] args) {
		USER a= new USER();
		USER b= new USER();
		Map m = new HashMap();
		m.put(a, "asd");
		m.put(b, "asd");
		System.out.println(m.size());
	}
}
